{% extends 'base.html' %}
{% block home %}
    <div style="background-color:pink;height: 100px">
        <form action="/home" method="post">
            <h2>首页</h2>
            <label for="s_name">姓名</label>
            <input type="text" name="s_name" placeholder="姓名">
            <span >*</span>
            <label for="s_sex">性别</label>
            <input type="text" name="s_sex" placeholder="性别" required>
            <span>*</span>
            <label for="s_age">年龄</label>
            <input type="text" name="s_age" placeholder="年龄">
            <span >*</span>
            <label for="s_phone">手机号码</label>
            <input type="text" name="s_phone" placeholder="手机号码" required>
            <span>*</span>
            <input type="submit" value="添加">
        </form>
{#        <a href="{{ url_for('home') }}">添加</a>#}
{#        <a href="{{ url_for('stus') }}"></a>#}
    </div>
    <div>
        {% if data %}
            {% for i in data %}
{#                <ul>#}
{#                    <li>#}
{#                        <style>#}
{#                            a {text-decoration: none}#}
{#                        </style>#}
{#                        <span>姓名：{{ i[0] }}</span>#}
{#                        <span>性别：{{ i[1] }}</span>#}
{#                        <span>年龄：{{ i[2] }}</span>#}
{#                        <span>电话：{{ i[3] }}</span>#}
{#                    </li>#}
{#                </ul>#}
                <ul>
                    <li>姓名：{{ i[0] }}，性别：{{ i[1] }}，年龄：{{ i[2] }}，电话：{{ i[3] }}</li>
                </ul>
            {% endfor %}
        {% endif %}
    </div>
{% endblock %}
